package org.xmonkey.notifier.model;

import java.util.Comparator;

/**
 * Thsi comparator is responsible for comparing subscribers.
 * The resulting order will be used to fire notifications
 * @author jacopom
 *
 */
public class SubscriberComparator implements Comparator<ISubscriber>{

	public int compare(ISubscriber first, ISubscriber second) {
		
		// I am using the order specified by the clients
		return new Integer(first.getSubscriberOrder()).compareTo(second.getSubscriberOrder());
	}

}
